/*
 * DistModeState.cpp
 *
 * Represents the Distance Mode State where
 * the trip distance as well as total distance
 * is displayed.
 *
 * Author: Zachary Masiello
 * Author: Peter-John Rowe
 */

#include "DistModeState.h"
#include "Cyclometer.h"

// Constructor
DistModeState::DistModeState(Cyclometer* cyclo) {
	ID = DIST_MODE_STATE_ID;
	stateName = "Distance Mode State";
	context = cyclo;
}

// Destructor
DistModeState::~DistModeState() {}

// Constantly displays the Distance
void DistModeState::activity() {
	while(context->getStateTable()->getRunActivity(this)) {
		context->displayDistance();
		sleep(3);
	}
}

void DistModeState::entryAction(){}
void DistModeState::exitAction(){}
